home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 43 / Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso / -serious- / programming / other / flexcat / lib / e32e.sd < prev    next >
Text File  |  1999-06-14  |  2KB  |  117 lines

  1. ##stringtype E
  2. /****************************************************************
  3.    This file was created automatically by `%fv'
  4.    from "%f0".
  5.    Do not edit by hand!
  6. ****************************************************************/
  7.  
  8. OPT MODULE
  9. OPT REG=5
  10.  
  11.  
  12. ->*****
  13. ->** External modules
  14. ->*****
  15. MODULE 'locale' , 'libraries/locale'
  16. MODULE 'utility/tagitem'
  17.  
  18.  
  19. ->*****
  20. ->** Object definitions
  21. ->*****
  22. EXPORT OBJECT fc_type PRIVATE
  23.   id:LONG
  24.   str:PTR TO CHAR
  25. ENDOBJECT
  26.  
  27. EXPORT OBJECT catalog_%b PUBLIC
  28.   %i            :PTR TO fc_type
  29. ENDOBJECT
  30.  
  31.  
  32. ->*****
  33. ->** Global variables
  34. ->*****
  35. DEF cat_%b:PTR TO catalog
  36.  
  37.  
  38. ->*****
  39. ->** Creation procedure for fc_type object
  40. ->*****
  41. PROC create(id,str:PTR TO CHAR) OF fc_type
  42.  
  43.   self.id:=id
  44.   self.str:=str
  45.  
  46. ENDPROC
  47.  
  48. ->*****
  49. ->** Procedure which returns the correct string according to the catalog
  50. ->*****
  51. PROC getstr() OF fc_type IS 
  52.   IF cat_%b THEN GetCatalogStr(cat_%b,self.id,self.str) ELSE self.str
  53.  
  54. PROC newcreate(id,stri)
  55. DEF fct:PTR TO fc_type
  56. ENDPROC NEW fct.create(id,stri)
  57.  
  58.  
  59. ->*****
  60. ->** Creation procedure for catalog_%b object
  61. ->*****
  62. PROC create() OF catalog_%b
  63.   cat_%b:=NIL
  64.  
  65.   self.%i:=newcreate(%d,{str_%e})
  66.  
  67. ENDPROC
  68.  
  69. PROC getCatalog() OF catalog_%b IS cat_%b
  70.  
  71. ->*****
  72. ->** Opening catalog procedure (exported)
  73. ->*****
  74. PROC open(loc=NIL:PTR TO locale,language=NIL:PTR TO CHAR ) OF catalog_%b
  75. DEF tag,
  76.     tagarg
  77.  
  78.   self.close()
  79.   IF localebase AND (cat_%b=NIL)
  80.     IF language
  81.       tag:=OC_LANGUAGE
  82.       tagarg:=language
  83.     ELSE
  84.       tag:=TAG_IGNORE
  85.     ENDIF
  86.  
  87.     cat_%b:=OpenCatalogA(loc,'%b.catalog',
  88.                          [OC_BUILTINLANGUAGE, %l,
  89.                           tag,                tagarg,
  90.                           OC_VERSION,         %v,
  91.                           TAG_DONE,0])
  92.  
  93.   ENDIF
  94.  
  95. ENDPROC
  96.  
  97.  
  98. ->*****
  99. ->** Closing catalog procedure
  100. ->*****
  101. PROC close() OF catalog_%b
  102.  
  103.   IF cat_%b
  104.     CloseCatalog(cat_%b)
  105.     cat_%b:=NIL
  106.   ENDIF
  107.  
  108. ENDPROC
  109.  
  110.  
  111. str_%e: CHAR %s,0
  112.  
  113.  
  114. /****************************************************************
  115.    End of the automatically created part!
  116. ****************************************************************/
  117.